<?php
class Application_Form_Login extends Zend_Form
{
    public function init() {
        $this->setName('login');
        $email = new Zend_Form_Element_Text('email');
        $email->setLabel('Email')
                 ->setRequired(true)
                 ->addFilter('StripTags')
                 ->addFilter('StringTrim')
                 ->addValidator('EmailAddress', true)
                 ->addValidator('NotEmpty', true, 
                     array('message' => array('isEmpty' => 'Field is required')));

        $password = new Zend_Form_Element_Password('password');
        $password->setLabel('Password')
                 ->setRequired(true)
                 ->addFilter('StripTags')
                 ->addFilter('StringTrim')
                 ->addValidator('NotEmpty', true, 
                     array('message' => array('isEmpty' => 'Field is required')));                               

        $submit = new Zend_Form_Element_Submit('login');
        $submit->setLabel('Login');

        $this->addElements(array($email, $password, $submit));
        $this->setMethod('post');
    }
}